Skip to content

connmgr: Move to internal.#3637

Merged
davecgh merged 3 commits intodecred:masterfrom
davecgh:connmgr_internal
Mar 4, 2026
Merged

connmgr: Move to internal.#3637
davecgh merged 3 commits intodecred:masterfrom
davecgh:connmgr_internal

Conversation

@davecgh
Copy link
Copy Markdown
Member

@davecgh davecgh commented Mar 4, 2026

This requires #3634, #3635, and #3636.

This makes the connmgr package an internal package such that it will no longer be an exported module. The only place its functionality is really needed is for the internal implementation of dcrd itself and thus having an unnecessary exported module significantly increases the maintenance burden.

It is worth noting that there are a few things, which will be listed below, that were exported from this module that callers might have previously relied upon. These things have been moved to the address manager module.

The aforementioned methods and types are:

  • TorLookupIP method and all associated ErrX constants
  • HttpsSeederFilters struct
  • DialFunc method
  • SeedFilterIPVersion method
  • SeedFilterProtocolVersion method
  • SeedFilterServices method
  • SeedAddrs method

Overview of the major changes:

  • Move the following files from connmgr -> internal/connmgr:
    • README.md
    • connmanager.go
    • connmanager_test.go
    • doc.go
    • dynamicbanscore.go
    • dynamicbanscore_test.go
    • error.go
    • error_test.go
    • log.go
  • Remove connmgr/go.mod and connmgr/go.sum
  • Make the README.md and docs.go files match the new reality
  • Update all import paths in the repository accordingly
  • Remove the dependency from the root go.mod
  • Run go mod tidy on all modules

@davecgh davecgh added this to the 2.2.0 milestone Mar 4, 2026
davecgh added 3 commits March 4, 2026 12:50
This makes the connmgr package an internal package such that it will no
longer be an exported module.  The only place its functionality is
really needed is for the internal implementation of dcrd itself and thus
having an unnecessary exported module significantly increases the
maintenance burden.

It is worth noting that there are a few things, which will be listed
below, that were exported from this module that callers might have
previously relied upon.  These things have been moved to the address
manager module.

The aforementioned methods and types are:

- TorLookupIP method and all associated ErrX constants
- HttpsSeederFilters struct
- DialFunc method
- SeedFilterIPVersion method
- SeedFilterProtocolVersion method
- SeedFilterServices method
- SeedAddrs method

Overview of the major changes:

- Move the following files from connmgr -> internal/connmgr:
  - README.md
  - connmanager.go
  - connmanager_test.go
  - doc.go
  - dynamicbanscore.go
  - dynamicbanscore_test.go
  - error.go
  - error_test.go
  - log.go
- Remove connmgr/go.mod and connmgr/go.sum
- Make the README.md and docs.go files match the new reality
- Update all import paths in the repository accordingly
- Remove the dependency from the root go.mod
- Run go mod tidy on all modules
This modifies the multimod go workspace setup script to remove the
connmgr module now that it is an internal package.

It also adds a directive to drop the use of the connmgr module from
existing go.work files.
@davecgh davecgh force-pushed the connmgr_internal branch from 7dc8ad8 to 5e1b5d8 Compare March 4, 2026 19:01
@davecgh davecgh merged commit 5e1b5d8 into decred:master Mar 4, 2026
32 checks passed
@davecgh davecgh deleted the connmgr_internal branch March 4, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants